<?php
namespace Home\Controller;

use Common\Controller\HomeController;
use Think\Crypt\Driver\Think;

/**
 * 地址控制器类
 * Class AddressController
 * @package Home\Controller
 */
class AddressController extends HomeController
{
    /**
     * 获取所有子集
     * @author Mr.Alien
     * @param $id int 父级id
     * @return json
     */
    public function ajaxChildren($id)
    {
        $list = M('Address')->where(array('parent_id'=>(int)$id))->select();
        $this->assign('list',$list);
        $this->display('content');
    }
}